<?php html::docType() ?>
<html>
<head>
	<?php html::head() ?>
	
	<!-- <link rel="stylesheet" type="text/css" href="../css/vic.css"> -->
	<link href="../css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="container">
		<?php html::navBar2() ?>
		<?php html::flash() ?>
		<div id="content">	 
			<div class="section" id="beer-view-main">
				<div class="section-title">
					<h1 class="page-name">Beers &#62; view</h1>
				</div>
				<?php 
				$brewery = urlencode($view->beer['brewery']['name']);
				$breweryLink = "http://www.google.com.au/search?q=$brewery&btnI=I%27m+Feeling+Lucky";
				$ratingElem = getRatingElement('beer', $view->beer['id'] , $view->beer['rating']);
				echo <<<HTML
				<div style="float:left; width: 700px;">
					<div class="beer-result">
						<span class="venue-name">{$view->beer['name']}</span>&nbsp;&nbsp;$ratingElem
						<span class="title-sub"><a href={$view->offersLink}>View offers with this beer</a></span>
					</div>
					<div class="beer-info">
						<p><b>Type:</b> {$view->beer['type']['type']}</p>
						<p><b>Brewery:</b> <span class="offer-beers"<a href="$breweryLink">{$view->beer['brewery']['name']}</a></span></p>
						<p><b>Country:</b> {$view->beer['brewery']['country']['name']}</p>
						<p><b>Number of rates:</b> {$view->beer['rate_count']}</p>
					</div>
					<div class="beer-picture">
						<img src="../img/beer/{$view->beer['id']}.jpg" />
					</div>
				</div>
				
HTML;
		?>
			</div>
		</div>
		<?php html::footer2()?>
	</div>
</body>
</html>